function model=update_sigma_1(model, n, MaxFun)


x0 = (model.sigma_1(n,:)').^2;
A  = -eye(size(x0,1));
B  = zeros(size(x0,1),1);


%options   = optimset('Algorithm','interior-point', 'MaxFunEvals', MaxFun, 'Display', 'off');

options   = optimset('Algorithm','interior-point','GradObj','on', 'MaxFunEvals', MaxFun, 'Display', 'off');

temp      = sqrt([fmincon(@L_sigma_1, x0, A, B, [], [], [], [], [], options, model, n)]');
ind       = find(temp<model.sigmamin);
temp(ind) = model.sigmamin;

model.sigma_1(n,:) = temp; 


end

